package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendOvertimeRuleAddDTO;
import org.jsola.hr.dto.AttendOvertimeRuleUpdateDTO;
import org.jsola.hr.query.AttendOvertimeRuleQuery;
import org.jsola.hr.vo.AttendOvertimeRuleListVO;
import org.jsola.hr.vo.AttendOvertimeRuleVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-考勤加班规则")
public interface IAttendOvertimeRuleControllerAPI {

    /**
     * 新增考勤加班规则
     * @param attendOvertimeRuleAddDTO 考勤加班规则新增实体
     * @return 考勤加班规则展示对象
     */
    @ApiOperation(value = "新增考勤加班规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendOvertimeRuleAddDTO", dataType = "AttendOvertimeRuleAddDTO", value = "新增考勤加班规则", paramType = "body")
    })
    Result<AttendOvertimeRuleVO> save(AttendOvertimeRuleAddDTO attendOvertimeRuleAddDTO);


    /**
     * 修改考勤加班规则
     * @param attendOvertimeRuleUpdateDTO 考勤加班规则
     * @return 更新数量
     */
    @ApiOperation(value = "修改考勤加班规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendOvertimeRuleUpdateDTO", dataType = "AttendOvertimeRuleUpdateDTO", value = "修改考勤加班规则", paramType = "body")
    })
    Result<Integer> update(AttendOvertimeRuleUpdateDTO attendOvertimeRuleUpdateDTO);




    /**
     * 删除单个考勤加班规则，彻底删除
     * @param attendOvertimeRuleId 考勤加班规则id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个考勤加班规则，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendOvertimeRuleId", dataType = "String", value = "考勤加班规则id", paramType = "path")
    })
    Result<Integer> delete(String attendOvertimeRuleId);


    /**
     * 批量删除考勤加班规则，彻底删除
     * @param attendOvertimeRuleIds 考勤加班规则id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除考勤加班规则，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendOvertimeRuleIds", dataType = "String[]", value = "考勤加班规则id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendOvertimeRuleIds);


    /**
     * 根据考勤加班规则id查询考勤加班规则详情
     * @param attendOvertimeRuleId 考勤加班规则id
     * @return 考勤加班规则详情
     */
    @ApiOperation(value="根据考勤加班规则id查询考勤加班规则详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendOvertimeRuleId", dataType = "String", value = "考勤加班规则id", paramType = "path")
    })
    Result<AttendOvertimeRuleVO> findById(String attendOvertimeRuleId);


    /**
     * 查询考勤加班规则
     * @param attendOvertimeRuleQuery 考勤加班规则查询参数
     * @return page
     */
    @ApiOperation(value="查询考勤加班规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendOvertimeRuleQuery", dataType = "AttendOvertimeRuleQuery", value = "考勤加班规则查询参数", paramType = "query")
    })
    Result<List<AttendOvertimeRuleListVO>> listAll(AttendOvertimeRuleQuery attendOvertimeRuleQuery);


     /**
     * 分页查询考勤加班规则
     * @param attendOvertimeRuleQuery 考勤加班规则查询参数
     * @return page
     */
    @ApiOperation(value="分页查询考勤加班规则")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendOvertimeRuleQuery", dataType = "AttendOvertimeRuleQuery", value = "考勤加班规则查询参数", paramType = "query")
    })
    Result<Page<AttendOvertimeRuleListVO>> page(AttendOvertimeRuleQuery attendOvertimeRuleQuery);


}

